package com.shtel.bss.saas.tenant.enums;

import com.shtel.bss.saas.core.base.exception.ExceptionCode;

public enum SysExceptionCode implements ExceptionCode {

    PARAM_IS_NULL("00001","%s"),
    ACCOUNT_NOT_FIND("00002","该账号不存在，账号：%s"),
    PASSWORD_IS_ERROR("00003","密码错误，账号：%s，密码：%s"),
    ACCOUNT_IS_EXISTS("00004","该账号已存在，账号：%s"),

    ;
    private String code;
    private String msg;
    private boolean embedMsg;

    SysExceptionCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
        if(msg.contains(IS_CONTAINS_PLACEHOLDER)){
            embedMsg = true;
        }else {
            embedMsg = false;
        }
    }

    @Override
    public String getCode() {

        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public boolean isEmbedMsg()  {
        return embedMsg;
    }
}
